<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.boxin.ims.modules.wechat.entity.Product" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0, user-scalable=0">
<title>赵唐-订单详情</title>
<link href="${ctxStatic }/site/themes/default/css/boilerplate.css" rel="stylesheet" type="text/css">
<link href="${ctxStatic }/site/themes/default/css/css.css" rel="stylesheet" type="text/css">
<script src="${ctxStatic }/site/themes/default/js/prefix-free.js"></script>
<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/jquery/jquery-migrate-1.1.1.min.js" type="text/javascript"></script>

<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script src="${ctxStatic}/site/themes/default/js/hideOptionMenu.js" type="text/javascript"></script>

<script type="text/javascript">
$(function(){
	$("#move").mouseover(function(){
		$("#moveshow").addClass("show");
		$("#moveUl").show();
	});
	
	$("#move").mouseout(function(){
		$("#moveshow").removeClass("show");
		setInterval("$('#moveUl').hide();",5000);
		
	});
});
</script>
<style type="text/css">
.user_item {
	position: absolute;
	top: 150px;
	left: 33%;
	margin:0 auto;
	text-align:center;
}
.icon_user:before {
	font:100px 'ElegantIcons';
	content: "\e08b";
	color: #ccc;
}
</style>
</head>
<body>
<div class="gridContainer clearfix" id="myorder">
  <div id="LayoutDiv1">
    <header>    
    <ul class="menu">  
    <span style=" font-size:18px; color:#FFF" class="left biaoti icon_left"   onclick="history.back(-1)" >订单列表 </span>
			<li id="moveshow" > <a href="#" id="move"  ><span class="icon_menu right"></span></a>
				<ul id="moveUl"  style="z-index: 100;display:none;">
						<jsp:include page="./right.jsp"></jsp:include>
				</ul>
			</li>			
		</ul>
    </header>
    <section class="clear">
    <div class="tab_list" style="min-height:180px;">
     	<c:forEach items="${goodsOrderList }" var="goodsOrder"  varStatus="var" >
		      <ul>
		      <li  style="background-color:#f3f3f3; 	border-top:3px #7bc001 dotted;"><span>订单号：${goodsOrder.orderNo }</span>
		      <span class="right fontred" style="">
		      <c:if test="${goodsOrder.status==0 }">
			   		待支付
			   </c:if>
			   <c:if test="${goodsOrder.status==2 }">
			   		待收货
			   </c:if>
			   <c:if test="${goodsOrder.status==3 }">
			  		交易完成 
  			   </c:if>
			   <c:if test="${goodsOrder.status==5 }">
			  		货到付款 
  			   </c:if>
  			   
  			   </span>
  			   </li>        
  			     <c:forEach  items="${goodsOrder.logs }"   var="log" >
  			     	<c:if test="${log.product ne null }">
				        <li class="clear">
				          <div class="tbl-cell" style="width:25%; text-align:center; "><img src="${ctxUser }/product/${log.product.indexPic}"></div>
				          <div class="tbl-cell" style=" width:65%; padding-left:3%; vertical-align:middle;">
				            <p>${log.product.name }</p>
				            <p class="fontred" style="padding-top:5px;">￥<fmt:formatNumber value="${log.product.price/100 }" pattern="##.##"  minFractionDigits="2"/></p>
				            <p style="padding-top:5px;">数量：${log.number }</p>
				          </div>
				          <div class="tbl-cell" style="width:5%; text-align:center;"> <span class="icon_href"></span> </div>
				        </li>
  			     	</c:if>
  			     	<c:if test="${log.flower ne null }">
				        <li class="clear">
				          <div class="tbl-cell" style="width:25%; text-align:center; "><img src="${ctxUser }/flower/${log.flower.coverImg}"></div>
				          <div class="tbl-cell" style=" width:65%; padding-left:3%; vertical-align:middle;">
				            <p>
				            	<c:if test="${log.buyWay eq '1' }">【购买】</c:if>
				            	<c:if test="${log.buyWay eq '2' }">【租赁】</c:if>
				            	${goodsOrder.name }
				            </p>
				            <p class="fontred" style="padding-top:5px;">￥
				            	<c:if test="${log.buyWay eq '1' }">
					            	<fmt:formatNumber value="${log.flower.salePrice/100 }" pattern="##.##"  minFractionDigits="2"/>
				            	</c:if>
				            	<c:if test="${log.buyWay eq '2' }">
					            	<fmt:formatNumber value="${log.flower.leasePrice/100 }" pattern="##.##"  minFractionDigits="2"/>
				            	</c:if>
				            </p>
				            <p style="padding-top:5px;">数量：${log.number }</p>
				          </div>
				          <div class="tbl-cell" style="width:5%; text-align:center;"> <span class="icon_href"></span> </div>
				        </li>
  			     		
  			     	</c:if>
  			     </c:forEach>
  			     
          
		         <li><div style="height:25px;">  下单时间：<fmt:formatDate value="${goodsOrder.createTime}" type="both"/></div>
		          <div style="height:25px;">          
          <span class="left">小计：￥<fmt:formatNumber value="${goodsOrder.price/100 }" pattern="##.##"  minFractionDigits="2"/></span>
          <span class="right">共计<c:out value="${goodsOrder.productNumber }" default="1"></c:out>件商品</span>
          </div>
		         </li>
		          <li>
          
          
		          <div style=" text-align:right;vertical-align:middle; ">
		             <c:if test="${goodsOrder.status==0 }">
			          <a href="${ctxFront }/site/shopping/deleteByFlag?uid=${uid}&wechatId=${wechatId}&orderId=${goodsOrder.id}">
			          	<input style="background-color: #666;padding: 3% 5% 3% 5%;" type="button" class="anniu" value="取消订单">
			          </a>
			          <a href="${ctxFront }/site/shopping/toPay?uid=${uid }&wechatId=${wechatId }&id=${goodsOrder.id }">
			          	<input class="anniu" value="立即支付"  type="button" style="background: #ef6103;padding: 3% 5% 3% 5%;">
			          </a>
			        </c:if>
			        <c:if test="${goodsOrder.status==2 }">
			          <a href="${ctxFront }/site/shopping/receipt?uid=${uid}&wechatId=${wechatId}&orderId=${goodsOrder.id}" >
			          	<input type="button" class="anniu" style="background: #c92626;padding: 3% 5% 3% 5%;" value="确认收货">
			          </a>
			        </c:if>
		          <%-- <c:if test="${goodsOrder.status==3 }">
		           <a href="${ctxFront }/site/shopping/deleteByFlag?uid=${uid}&wechatId=${wechatId}&orderId=${goodsOrder.id}"><span class="anniu huise">取消订单</span></a>
		          </c:if> --%>
		          </div>
		          </li>
		      </ul>
     	</c:forEach>
     	<c:if test="${empty goodsOrderList }">
      		  <div class="user_item"><p><i class="icon_user"></i></p><br>
			   <p style="text-align:center;">您暂时没有订单</p>
			  </div>
      	</c:if>
      </div>  
    </section>      
  </div>  
  <div class="jszch">技术支持：<a href="http://www.hdzhx.com/boxin/index.html" >智讯互联</a></div>
</div>
</body>
</html>
